<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <button onclick="alert('我被电击了')">点击1</button> -->
     <button onclick="show()">点击1</button>
    <script>
        //函数shuow():弹出警告(别点我)；
        function show(){
            alert('别点我');
        }
    </script> 
    <button class="btn1">点击2</button>   
    <script>
        const btn1 = document.querySelector('.btn1');
        btn1.onclick = function(){
            alert('hello DOMO');
        }

    </script> 
    <button class="btn2">点击3</button>
    <script>
        const btn3 = document.querySelector('.btn3');
        btn3.addEventListener('clinck',function(){
            alert('hello DOM3');
        },false);

    </script>                                                                           
</body>
</html>